<a:form id="form1" style="margin:0px;" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:s="http://jboss.com/products/seam/taglib">
		<s:link view="/default.xhtml" title="返回首页">
			<h:graphicImage value="../images/logo.jpg"
				style="border:0;margin-bottom: 0px;" />
		</s:link>
		<span style="font-size: 25px; font-weight: bold;"> <ui:insert
			name="logoTitle" /> </span>

		<rich:spacer width="20px" />
		<h:inputText value="#{searchAction.searchString}" style="width:100px;" />
		<a:commandButton id="searchButton" value="搜索" action="#{searchAction.luceneSearch()}" />
		<br /><br />
<script>
 document.onkeydown=function(event)  
 {//捕捉回车  
	e = event ? event :(window.event ? window.event : null); //兼容IE,firefox
    if (e.keyCode==13)  
        {  
    	document.forms['form1']['form1:searchButton'].focus();
    	document.forms['form1']['form1:searchButton'].click(); 
    	document.forms['form1']['form1:searchButton'].disabled=true;
        }  
 }  
</script>
</a:form>
